<template>
  <div>
    <p v-text="theCardTitle"></p >
    <span>{{childValue}}</span>
    <div>
      <button @click="ok">OK</button>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      theCardTitle: "子组件",
      childValue: "我是子组件的数据"
    };
  },
  methods: {
    ok() {
      this.$emit("childByValue", this.childValue);
    }
  }
};
</script>